import java.util.Scanner;

/**
 * Created by Salted fish
 * Description:
 * User: 24539
 * Date：2021-07-30
 * Time: 13:58
 */
public class Test7 {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        int n = sn.nextInt();
        fun(n);
    }

    public static void fun(int n) {
        if (n > 9) {
            fun(n / 10);
        }
        System.out.print(" " + n % 10 + " ");
    }
}
